package cn.yh.shop.product.model;

import org.springframework.stereotype.Component;

/**
 * @Description:购物车详情类
 * @author:"李战召"
 * @time:2016年12月14日 下午5:57:29
 */
@Component
public class CartItem {
	/**
	 * 商品id
	 */
	private Integer goodsId; 
	/**
	 * 商品名称
	 */
	private String name;
	/**
	 * 商品口味
	 */
	private String taste;
	/**
	 * 口味id
	 */
	private Integer tasteId;
	/**
	 * 商品包装
	 */
	private String pakage;
	/**
	 * 包装id
	 */
	private Integer pakageId;
	
	/**
	 * 商品图片路径
	 */
	private String imgname;
	/**
	 *  商品原价
	 */
	private Double prePrice;
	/**
	 *  商品价格
	 */
	private Double price;
	/**
	 * 商品数量
	 */
	private Integer count; 
	/**
	 * 总金额
	 */
	private Double total; 
	/**
	 * 标志位(购物车结算的时候,是否被选中,默认未被选中)
	 */
	private int flag; 
	/**
	 * @Description: isfree : 是否有邮费 1:包邮 2:有邮费
	 */
	private int isfree;  
	
	public Integer getGoodsId() {
		return goodsId;
	}
	public void setGoodsId(Integer goodsId) {
		this.goodsId = goodsId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Double getPrice() {
		return price;
	}
	public void setPrice(Double price) {
		this.price = price;
	}
	public Integer getCount() {
		return count;
	}
	public void setCount(Integer count) {
		this.count = count;
	}
	
	public String getTaste() {
		return taste;
	}
	public void setTaste(String taste) {
		this.taste = taste;
	}
	public String getPakage() {
		return pakage;
	}
	public void setPakage(String pakage) {
		this.pakage = pakage;
	}
	public Double getTotal() {
		total = price*count;
		return total;
	}
	public void setTotal(Double total) {
		this.total = total;
	}
	public Double getPrePrice() {
		return prePrice;
	}
	public void setPrePrice(Double prePrice) {
		this.prePrice = prePrice;
	}
	public int getFlag() {
		return flag;
	}
	public void setFlag(int flag) {
		this.flag = flag;
	}
	public String getImgname() {
		return imgname;
	}
	public void setImgname(String imgname) {
		this.imgname = imgname;
	}
	public Integer getTasteId() {
		return tasteId;
	}
	public void setTasteId(Integer tasteId) {
		this.tasteId = tasteId;
	}
	public Integer getPakageId() {
		return pakageId;
	}
	public void setPakageId(Integer pakageId) {
		this.pakageId = pakageId;
	}
	public int getIsfree() {
		return isfree;
	}
	public void setIsfree(int isfree) {
		this.isfree = isfree;
	}
	@Override
	public String toString() {
		return "CartItem [goodsId=" + goodsId + ", name=" + name + ", taste=" + taste + ", tasteId=" + tasteId
				+ ", pakage=" + pakage + ", pakageId=" + pakageId + ", imgname=" + imgname + ", prePrice=" + prePrice
				+ ", price=" + price + ", count=" + count + ", total=" + total + ", flag=" + flag + ", isfree=" + isfree
				+ "]";
	}
	
}
